import { Entity, Column, PrimaryGeneratedColumn, PrimaryColumn } from 'typeorm';

@Entity()
export class User {
  @PrimaryGeneratedColumn('uuid')
  id: string;

  @Column('char')
  @PrimaryColumn()
  userId: string;

  @Column('char')
  @PrimaryColumn()
  username: string;

  @Column('varchar', { length: 225 })
  password: string;

  @Column({ type: 'varchar', default: '' })
  city: string;

  @Column({ type: 'varchar', default: '' })
  birthTime: string;

  @Column({ type: 'double', default: new Date().valueOf() })
  createTime: number;
}
